﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using Models;
using BLL;

namespace PCCS.Management.AdminManage
{
    public partial class RoleUserControl : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DisplayRoleRightMenu();
            }
        }

        //显示角色菜单信息
        protected void DisplayRoleRightMenu()
        {
            //得到父节点的值
            int nodeId = int.Parse(hidParentMenu.Value);

            IList<LeftType> sysFuns = LeftTypeManager.GetLeftTypesByLeftID(nodeId);
            foreach (LeftType sysFun in sysFuns)
            {
                ListItem li = new ListItem();
                li.Value = sysFun.LeftTypeID.ToString();
                li.Text = sysFun.TypeTitle;
                chkChildMenu.Items.Add(li);
            }
        }
    }
}